/*
 * DeviceCalibrator.h
 *
 *  Created on: 22/09/2011
 *      Author: agustin
 *
 *
 * OpenVC License
 *
 * Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
 * Copyright (C) 2009, Willow Garage Inc., all rights reserved.
 * Third party copyrights are property of their respective owners.
 *
 * This software is provided by the copyright holders and contributors "as is" and
 * any express or implied warranties, including, but not limited to, the implied
 * warranties of merchantability and fitness for a particular purpose are disclaimed.
 * In no event shall the Intel Corporation or contributors be liable for any direct,
 * indirect, incidental, special, exemplary, or consequential damages
 * (including, but not limited to, procurement of substitute goods or services;
 * loss of use, data, or profits; or business interruption) however caused
 * and on any theory of liability, whether in contract, strict liability,
 * or tort (including negligence or otherwise) arising in any way out of
 * the use of this software, even if advised of the possibility of such damage.
 */

#ifndef DEVICECALIBRATOR_H_
#define DEVICECALIBRATOR_H_


#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>

#include "DebugUtil.h"
#include "ImageProcessor.h"
#include "ImageGenerator.h"

class DeviceCalibrator {
public:
	DeviceCalibrator();
	virtual ~DeviceCalibrator();

	/* Function that takes the image generator to be calibrated and returns
	 * the image processor that it will have to be applied to the frames
	 * generated by the generator. This will fix the "image problems"
	 * Params:
	 * 	@gen		The image generator (device) to be calibrated
	 * 	@err		The error code returned by this function
	 * Returns:
	 * 	0			on error
	 * 	ImgProc		on success. This ImageProcessor must be deleted by the user
	 */
	virtual ImageProcessor *calibrateDevice(ImageGenerator *gen, errCode &err) = 0;
};

#endif /* DEVICECALIBRATOR_H_ */
